<template>
    <div>
        <el-form
            :model="form"
            ref="formRef"
            :rules="formRules"
            label-width="80px"
            :inline="false"
            size="small"
        >
            <el-form-item label="姓名">
                <el-input v-model="form.a"></el-input>
            </el-form-item>
            <el-form-item label="性别">
                <el-input v-model="form.a"></el-input>
            </el-form-item>
            <el-form-item label="年龄">
                <el-input v-model="form.a"></el-input>
            </el-form-item>
            <el-form-item label="类型">
                <el-input v-model="form.a"></el-input>
            </el-form-item>
            <el-form-item label="身份证">
                <el-input v-model="form.a"></el-input>
            </el-form-item>
            <el-form-item label="手机">
                <el-input v-model="form.a"></el-input>
            </el-form-item>
            <el-form-item label="微信">
                <el-input v-model="form.a"></el-input>
            </el-form-item>
            <el-form-item label="QQ">
                <el-input v-model="form.a"></el-input>
            </el-form-item>
            <el-form-item label="头像">
                <el-upload
                    class="avatar-uploader"
                    action="https://jsonplaceholder.typicode.com/posts/"
                    :show-file-list="false"
                    :on-success="handleAvatarSuccess"
                    :before-upload="beforeAvatarUpload"
                >
                    <img v-if="imageUrl" :src="imageUrl" class="avatar" />
                    <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                </el-upload>
            </el-form-item>
            <el-form-item label="备注">
                <el-input v-model="form.a"></el-input>
            </el-form-item>
            <el-form-item align="center">
                <el-button type="primary" @click="onSubmit">保存</el-button>
                <el-button>取消</el-button>
            </el-form-item>
        </el-form>
    </div>
</template>

<script>
export default {
    name:'saveOwner',
    data() {
        return {
            form: {},
            formRules: {},
        };
    },
};
</script>

<style lang="scss" scoped>
v-deep .avatar-uploader .el-upload {
    border: 1px dashed #d9d9d9 !important;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.avatar-uploader .el-upload:hover {
    border-color: #409eff;
}
.avatar-uploader-icon {
    font-size: 28px;
    color: #8c939d;
    width: 178px;
    height: 178px;
    line-height: 178px;
    text-align: center;
}
.avatar {
    width: 178px;
    height: 178px;
    display: block;
}
</style>